#ifndef COUNCIL_MEMBER_TEST_HPP
#define COUNCIL_MEMBER_TEST_HPP

#include <gtest/gtest.h>
#include <sstream>
#include "CouncilMember.h"

TEST(TestOutput, ShouldReturnExpected)
{
  CouncilMember member("145", "Alexei Kolganov", "High Street. 55", "+5555-55-55");
  std::ostringstream stream;
  stream << member;
  ASSERT_EQ("145|Alexei Kolganov|High Street. 55|+5555-55-55\n", stream.str());
}

TEST(TestInput, ShouldReturnExpected)
{
  std::istringstream stream;
  stream.str("145|Alexei Kolganov|High Street. 55|+5555-55-55\n");
  CouncilMember member;
  stream >> member;
  ASSERT_EQ("145", member.id());
  ASSERT_EQ("Alexei Kolganov", member.name());
  ASSERT_EQ("High Street. 55", member.address());
  ASSERT_EQ("+5555-55-55", member.phone());
}

#endif // COUNCIL_MEMBER_TEST_HPP